'''
Created on Jul 20, 2012

@author: thomas_dao
'''
from google.appengine.ext import ndb
from kid import util
import logging
from entity.entity import Comment
from datetime import datetime
from web import settings

@ndb.tasklet
def get_all(url=None, start_cursor=None):
    qry = Comment.query(Comment.url==url).order(Comment.created_time)
    (comments, cur, more) = yield qry.fetch_page_async(settings.BATCH_SIZE, 
                                                       start_cursor=start_cursor)
    raise ndb.Return(comments, cur, more)


